feat(audio): mute system output while recording#101
Conversation
Silence other apps' playback for the duration of a recording so it neither distracts the speaker nor bleeds into the mic. Mutes the current default output device on capture start and restores exactly that device on stop; leaves an already-user-muted device untouched (and skips the restore).
|
Thanks for the PR — the implementation is clean and well thought through: pure CoreAudio with no new deps, remembering the exact device so a mid-session default-route change can't strand the wrong one, skipping devices the user had already muted, and gracefully handling devices without a master-mute property. Nice work. I'd like one design change before merging, plus one robustness fix. 1. Make it an opt-in setting (default off), not automaticI'd prefer muting to be a user choice rather than always-on. Concretely, this can follow the existing
The default should be off, so existing users' behavior is unchanged and the people who want it can turn it on. 2. Restore on abnormal exit
Minor
Everything else looks solid: the mute/restore pairing is balanced and idempotent across the various |
What
Mutes other apps' audio output for the duration of a recording, so background playback neither distracts the speaker nor bleeds into the microphone.
How
SPAudioCaptureManagermutes the current default output device on capture start and restores exactly that device on stop (remembered explicitly, so a mid-session default-route change can't leave the wrong device muted). If the device was already muted by the user, it is left untouched and the restore is skipped. Devices without a master-mute property are detected and skipped gracefully. Implemented purely via CoreAudio (kAudioDevicePropertyMute), no new dependencies.Testing
make/Xcode Release build passes.Notes
CHANGELOG.mdupdated under anUnreleasedsection.docs/update-feed.jsonleft untouched — it tracks published releases (currently still at 1.0.14) and is best updated by the maintainer at release time.